package com.wangrui.mapper;

import com.wangrui.dto.AllClassGrade;
import com.wangrui.dto.MajorSchool;
import com.wangrui.pojo.ClassGrade;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wangrui.utils.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 王锐
 * @since 2020-07-10
 */
public interface ClassGradeMapper extends BaseMapper<ClassGrade> {
    @Select(" SELECT class_grade.*,major.name as majorName,school.name as schoolName,school.address,`user`.truename \n" +
            "from major,school,class_grade,`user` \n" +
            "WHERE class_grade.sid=school.id and class_grade.mid = major.id and class_grade.uid = `user`.id limit #{start},#{pageSize}")
    List<AllClassGrade> getAllClassGrade(Page<AllClassGrade> page1);

}
